var express = require('express');
var router = express.Router();
var { DoctorModel, EvaluateModel, BeautyModel } = require('../db/model')

//获取医生表
router.get('/doctorList', async (req, res) => {
  let data = await DoctorModel.find()
  res.send({
    code: 200,
    data
  })
})
//获取评价表
router.get('/evaluateList', async (req, res) => {
  let data = await EvaluateModel.find()
  res.send({
    code: 200,
    data
  })
})
//获取美容表
router.get('/beautyList', async (req, res) => {
  let data = await BeautyModel.find()
  res.send({
    code: 200,
    data
  })
})

module.exports = router;
